summaryrefslogtreecommitdiffstats
path: root/src/common/android/android_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/android/android_common.h')
-rw-r--r--src/common/android/android_common.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/common/android/android_common.h b/src/common/android/android_common.h
new file mode 100644
index 000000000..d0ccb4ec2
--- /dev/null
+++ b/src/common/android/android_common.h
@@ -0,0 +1,26 @@
+// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <string>
+
+#include <jni.h>
+#include "common/common_types.h"
+
+namespace Common::Android {
+
+std::string GetJString(JNIEnv* env, jstring jstr);
+jstring ToJString(JNIEnv* env, std::string_view str);
+jstring ToJString(JNIEnv* env, std::u16string_view str);
+
+double GetJDouble(JNIEnv* env, jobject jdouble);
+jobject ToJDouble(JNIEnv* env, double value);
+
+s32 GetJInteger(JNIEnv* env, jobject jinteger);
+jobject ToJInteger(JNIEnv* env, s32 value);
+
+bool GetJBoolean(JNIEnv* env, jobject jboolean);
+jobject ToJBoolean(JNIEnv* env, bool value);
+
+} // namespace Common::Android